import axios from './http'

export default {
	//1. 删除资源分类
	resourceDell(data) {
		return axios.post('/delCategory', data)
	},

	// 6.获取资源类别
	getZiyuanCategorys(subclass=false) {
		return axios.get('/getZiyuanCategorys?subclass='+subclass)
	},
	// 7.资源列表
	getZiYuanData(
		page,
		pageSize,
		status = '',
		category_id = '',
		ziyuan_title = '',
		user_name = ''
	) {
		return axios.get(
			'/getZiyuanList?' +
			'page=' + page + '' +
			'&pageSize=' + pageSize + '' +
			'&status=' + status + '' +
			'&category_id=' + category_id + '' +
			'&ziyuan_title=' + ziyuan_title + '' +
			'&user_name=' + user_name + ''
		)
	},
	// 8.获取订单列表
	getOrderList(page, pageSize) {
		return axios.get('/getOrderList?page=' + page + '&pageSize=' + pageSize)
	},
	// 9.下载记录
	getDownloadLog(page, pageSize) {
		return axios.get('/getDownloadLog?page=' + page + '&pageSize=' + pageSize)
	},
	// 1.添加，修改资源分类
	ziyuanCategoryList(data) {
		return axios.post('/ziyuanCategory', data)
	},
	// 4.资源审核
	postZiyuanAudit(data) {
		return axios.post('/ziyuanAudit', data)
	},
	// 获取资源详情
	getZiyuanInfo(id, info=false) {
		return axios.get('/getZiyuanInfo?id='+id+'&info='+info)
	},
}
